<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ page contentType="text/html;charset=utf-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn"%>
<%@ include file="header_admin.jsp"%>

<!-- 以上为页头 设置head 引用样式相关信息 请勿修改  请直接修改header.jsp文件  by 小灯笼 -->
<<script type="text/javascript">

$(function(){
	
	var v = $("#isagree").val();
	if (v == 0) {
		$("#backreason").attr("required","required");
		$("#disagree").show();
	} else {
		$("#backreason").removeAttr("required");
		$("#disagree").hide();
	}
	$("#isagree").click(function() {
			var v = $("#isagree").val();
			if (v == 0) {
				$("#backreason").attr("required","required");
				$("#disagree").show();
			} else {
				$("#backreason").removeAttr("required");
				$("#disagree").hide();
			}
		});
	});
</script>
<!-- 以下为正文 -->
<div class="container">
		<div class="row-fluid">
		<div class="span12">
			<div class="widget">
				<div class="widget-header"><h3>${roomid }会议室的预定信息</h3></div>
				<div class="widget-body">
					<form class="form-horizontal no-margin" action="/mycms/admin/room_update"
						method="post">
						<input type="hidden" name="id" value="${orderinfo.id }">
						<div class="control-group">
							<label class="control-label" for="b_id"> 房间号 </label>
							<div class="controls controls-row">
							<input value="${roomid }" class="span4" type="text" readonly="readonly">
							</div>
						</div>
						<div class="control-group">
							<label class="control-label" for="b_size"> 预定人</label>
							<div class="controls controls-row">
							<input value="${orderinfo.college }&nbsp;&nbsp;&nbsp;${username }" class="span4" type="text" readonly="readonly">	
							</div>
						</div>
						
						<div class="control-group">
							<label class="control-label" for="b_size"> 预定日期</label>
							<div class="controls controls-row">
							<input value="${fn:substring(orderinfo.orderDate, 0, 10) }" class="span4" type="text" readonly="readonly">
							 
								
							</div>
						</div>
						<div class="control-group">
							<label class="control-label" for="b_size"> 预定时间</label>
							<div class="controls controls-row">

								<c:choose>
									<c:when test="${orderinfo.orderTime  == 1}">
										<input value="08:00 - 10:00" class="span4" type="text"
											readonly="readonly">
									</c:when>
									<c:when test="${orderinfo.orderTime  == 2}">
									<input value="10:30 - 12:00" class="span4" type="text"
											readonly="readonly">
													
									</c:when>
									<c:when test="${orderinfo.orderTime  == 3}">
									<input value="14:00 - 17:00" class="span4" type="text"
											readonly="readonly">		
									</c:when>
									<c:when test="${orderinfo.orderTime  == 4}">
									<input value="19:00 - 22:00" class="span4" type="text"
											readonly="readonly">												
									</c:when>
								</c:choose>

							</div>
						</div>
						<div class="control-group">
							<label class="control-label" for="b_size"> 预定理由</label>
							<div class="controls controls-row">
							<textarea rows="3" id="remarks" name="remarks"
									class="span4" disabled>${orderinfo.reason }</textarea>
							</div>
						</div>
						<div class="control-group">
							<label class="control-label" for="media"> 是否同意 </label>
							<div class="controls controls-row">
								<select name="isagree" id="isagree" class="form-control span4">
									<c:choose>
									<c:when test="${orderinfo.approved  == 0}">
										<option value="0">不同意</option>
										<option value="1">同意</option>
									</c:when>
									<c:when test="${orderinfo.approved  == 1}">
											<option value="1">同意</option>
											<option value="0">不同意</option>
									</c:when>
								</c:choose>		
								</select>
							</div>
						</div>
				
						<div id="disagree" class="control-group">
							<label class="control-label" for="remarks"> 不同意理由 </label>
							<div class="controls">
								<textarea rows="5" id="backreason" name="backreason"
									class="span4 input-block-level" >${orderinfo.backReason }</textarea>
							</div>
						</div>
						<div class="form-actions no-margin">
							<button type="submit" class="btn btn-info pull-center">
								提交</button>
							<div class="clearfix"></div>
						</div>
					</form>
				</div>
			</div>
		</div>
	</div>
</div>
<!-- 以上为正文 -->

<!-- 以下为页脚 及JS相关 请勿修改 请直接修改footer.jsp文件   by 小灯笼 -->
<jsp:include page="footer.jsp" />